// WARNING: This file has been generated. Any manual changes must be made within preserved regions or they will be lost.

//===============================================================================
//
// MethodParameterDetailsCollection
//
// PURPOSE: 
// 
//
// NOTES: 
// 
//
//===============================================================================
//
// Copyright (C) 2006 Wallis Software Solutions
// All rights reserved.
//
//===============================================================================

namespace Agile.Common.Reflections
{
    /// <summary>
    /// MethodParameterDetailsCollection
    /// </summary>
    public class MethodParameterDetailsCollection : AgileCollection
    {
        #region Preserved Region - Developer Hand Written Code

        #endregion // Preserved Region - Developer Hand Written Code

        #region Constructors and Factories

        /// <summary>
        /// Constructor
        /// </summary>
        private MethodParameterDetailsCollection()
        {
        }

        /// <summary>
        /// Instantiate a new MethodParameterDetailsCollection
        /// </summary>
        public static MethodParameterDetailsCollection Build()
        {
            return new MethodParameterDetailsCollection();
        }

        #endregion

        #region Strongly Typed IList Implementations

        /// <summary>
        /// Returns the MethodParameterDetails that is at the given index in the collection.
        /// </summary>
        public MethodParameterDetails this[int index]
        {
            get { return InnerList[index] as MethodParameterDetails; }
        }

        /// <summary>
        /// Add a new MethodParameterDetails to the collection
        /// </summary>
        /// <param name="methodParameterDetails">methodParameterDetails to add to the collection.</param>
        public void Add(MethodParameterDetails methodParameterDetails)
        {
            if (Contains(methodParameterDetails))
            {
                string message =
                    string.Format("Tried adding a MethodParameterDetails to the collection but it is already in it.");
                throw new AgileCommonException(message);
            }
            List.Add(methodParameterDetails);
        }

        /// <summary>
        /// Remove a MethodParameterDetails from the collection
        /// </summary>
        /// <param name="methodParameterDetails">methodParameterDetails to remove from the collection.</param>
        public void Remove(MethodParameterDetails methodParameterDetails)
        {
            InnerList.Remove(methodParameterDetails);
        }

        /// <summary>
        /// Checks if the given MethodParameterDetails is in the collection
        /// </summary>
        /// <param name="lookFor">methodParameterDetails to look for in the collection.</param>
        /// <returns>True if the item is in the collection.</returns>
        public bool Contains(MethodParameterDetails lookFor)
        {
            return InnerList.Contains(lookFor);
        }

        /// <summary>
        /// Searches for the specified MethodParameterDetails and returns the zero-based index
        /// of the first occurrence within the section of the
        /// collection that starts at the
        /// specified index and contains the specified number of elements.
        /// </summary>
        /// <param name="methodParameterDetails">methodParameterDetails to get the index of from the collection.</param>
        /// <returns>The index of the item in the collection.</returns>
        public int IndexOf(MethodParameterDetails methodParameterDetails)
        {
            return InnerList.IndexOf(methodParameterDetails);
        }

        /// <summary>
        /// Searches for the specified MethodParameterDetails and returns the zero-based index
        /// of the first occurrence within the section of the
        /// collection that starts at the
        /// specified index and contains the specified number of elements.
        /// </summary>
        /// <param name="methodParameterDetails">methodParameterDetails to get the index of from the collection.</param>
        /// <param name="startIndex">The zero-based starting index of the search.</param>
        /// <returns>The index of the item in the collection.</returns>
        public int IndexOf(MethodParameterDetails methodParameterDetails, int startIndex)
        {
            return InnerList.IndexOf(methodParameterDetails, startIndex);
        }

        /// <summary>
        /// Searches for the specified MethodParameterDetails and returns the zero-based index
        /// of the first occurrence within the section of the
        /// collection that starts at the
        /// specified index and contains the specified number of elements.
        /// </summary>
        /// <param name="methodParameterDetails">methodParameterDetails to get the index of from the collection.</param>
        /// <param name="startIndex">The zero-based starting index of the search.</param>
        /// <param name="count">The number of elements in the section to search.</param>
        /// <returns>The index of the item in the collection.</returns>
        public int IndexOf(MethodParameterDetails methodParameterDetails, int startIndex, int count)
        {
            return InnerList.IndexOf(methodParameterDetails, startIndex, count);
        }

        /// <summary>
        /// Inserts the MethodParameterDetails into the collection at the specified index.
        /// </summary>
        /// <param name="index">The zero-based index at which value should be inserted.</param>
        /// <param name="methodParameterDetails">methodParameterDetails to insert into the collection.</param>
        public void Insert(int index, MethodParameterDetails methodParameterDetails)
        {
            InnerList.Insert(index, methodParameterDetails);
        }

        /// <summary>
        /// Copies a range of elements from the collection of MethodParameterDetails's to a compatible
        /// one-dimensional System.Array, starting at the specified index of the target array.
        /// </summary>
        /// <param name="methodParameterDetailss">The one-dimensional System.Array that is the destination of the elements copied from the collection. The System.Array must have zero-based indexing.</param>
        /// <param name="index">The zero-based index at which copying begins.</param>
        public void CopyTo(MethodParameterDetails[] methodParameterDetailss, int index)
        {
            List.CopyTo(methodParameterDetailss, index);
        }

        #endregion
    }
}